package com.shrct.businessprocess.customerservice.impl;

import com.shrct.businessprocess.customerservice.RCServiceDocumentType;
import com.shrct.businessprocess.customerservice.proxy.RCServiceDocumentTypeProxy;
import edu.fudan.langlab.domain.code.impl.CodeImpl;
import edu.fudan.mylang.pf.IObjectFactory;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;

@Entity
@DiscriminatorValue("RCSERVICEDOCUMENTTYPE_TYPE")
public class RCServiceDocumentTypeImpl extends CodeImpl implements RCServiceDocumentType {
  public RCServiceDocumentTypeImpl() {
    super();
  }
  
  public static RCServiceDocumentType create(final IObjectFactory objectFactory) {
    com.shrct.businessprocess.customerservice.RCServiceDocumentType rCServiceDocumentType = new com.shrct.businessprocess.customerservice.impl.RCServiceDocumentTypeImpl(
    );
    objectFactory.create(rCServiceDocumentType);
    return rCServiceDocumentType;			
    
  }
  
  public static RCServiceDocumentType createRCServiceDocumentTypeImpl(final IObjectFactory objectFactory, final Procedure1<RCServiceDocumentType> init) {
    com.shrct.businessprocess.customerservice.RCServiceDocumentType rCServiceDocumentType = new com.shrct.businessprocess.customerservice.impl.RCServiceDocumentTypeImpl(
    );
    objectFactory.create(rCServiceDocumentType);
    init.apply(rCServiceDocumentType);
    
    return rCServiceDocumentType;			
    
  }
  
  public RCServiceDocumentTypeProxy toProxy() {
    com.shrct.businessprocess.customerservice.proxy.RCServiceDocumentTypeProxy proxy = new com.shrct.businessprocess.customerservice.proxy.RCServiceDocumentTypeProxy();
    proxy.setId(this.getId());
    if(this instanceof edu.fudan.mylang.pf.INamedModelObject){
    	proxy.setName(((edu.fudan.mylang.pf.INamedModelObject)this).getEntityName());
    }
    return proxy;
    
  }
}
